//
//  MyRepariViewController.m
//  PropertyManager
//
//  Created by TNG on 2018/7/19.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "MyRepariViewController.h"

@interface MyRepariViewController ()

@end

@implementation MyRepariViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"我的报修";
    self.view.backgroundColor = [UIColor redColor];

    [self setTabBarFrame:CGRectMake(0,kStatusAndNavBarH, WIDTH, 50)
        contentViewFrame:CGRectMake(0, 50 + kStatusAndNavBarH, WIDTH, HEIGHT - kStatusAndNavBarH - kHomeLineH - 50)];
    self.tabBar.itemTitleColor =SFMColor(51, 51, 51) ;
    self.tabBar.itemTitleSelectedColor = SFMColor(255, 55, 88);
    self.tabBar.itemTitleFont = font(14);
    self.tabBar.itemTitleSelectedFont = font(14);
    [self.tabBar setScrollEnabledAndItemWidth:WIDTH/4];
    [self.tabContentView setLoadViewOfChildContollerWhileAppear:YES];
    [self.tabContentView setContentScrollEnabled:YES tapSwitchAnimated:NO];
    self.tabBar.indicatorScrollFollowContent = YES;
    self.tabBar.itemFontChangeFollowContentScroll = YES;
    
    [self addCtr];
}

-(void)addCtr
{
    WaitingDealViewController * wait = [[WaitingDealViewController alloc] init];
    wait.yp_tabItemTitle = @"待处理";
    
    handleViewController * handle = [[handleViewController alloc] init];
    handle.yp_tabItemTitle = @"处理中";
    
    HaveHandleViewController * have = [[HaveHandleViewController alloc] init];
    have.yp_tabItemTitle = @"已完成";
    
    AllViewController * all = [[AllViewController alloc] init];
    all.yp_tabItemTitle = @"全部";
    
    self.viewControllers = @[wait,handle,have,all];
}

-(BOOL)hidesBottomBarWhenPushed
{
    return YES;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
